package com.proyemp.entity.classes;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * The primary key class for the materiales_programas database table.
 * 
 */
@Embeddable
public class MaterialesProgramaPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="nro_programa")
	private Integer nroPrograma;

	@Column(name="id_material")
	private Integer idMaterial;

    public MaterialesProgramaPK() {
    }
	public Integer getNroPrograma() {
		return this.nroPrograma;
	}
	public void setNroPrograma(Integer nroPrograma) {
		this.nroPrograma = nroPrograma;
	}
	public Integer getIdMaterial() {
		return this.idMaterial;
	}
	public void setIdMaterial(Integer idMaterial) {
		this.idMaterial = idMaterial;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof MaterialesProgramaPK)) {
			return false;
		}
		MaterialesProgramaPK castOther = (MaterialesProgramaPK)other;
		return 
			this.nroPrograma.equals(castOther.nroPrograma)
			&& this.idMaterial.equals(castOther.idMaterial);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.nroPrograma.hashCode();
		hash = hash * prime + this.idMaterial.hashCode();
		
		return hash;
    }
}